{extend name="public/base" /}
{block name="title"}商品分类{/block}

{block name="content"}
<h2 class="sub-header">商品分类管理</h2>[ <a href="{:url('add')}">增加顶级分类</a> ] [ <a href="{:url('fladmin/Goods/add')}">发布商品</a> ]<br><br>

<form name="listarc"><div class="table-responsive">
<table class="table table-striped table-hover">
<thead><tr><th>ID</th><th>名称</th><th>别名</th><th>更新时间</th><th>操作</th></tr></thead>
<tbody id="cat-list">
<?php if($list){foreach($list as $row){ ?>
<tr id="cat-<?php echo $row["id"]; ?>">
<td><?php echo $row["id"]; ?></td>
<td><a href="{:url('fladmin/goods/index')}?type_id=<?php echo $row["id"]; ?>"><?php for($i=0;$i<$row["deep"];$i++){echo "— ";}echo $row["name"]; ?></a></td>
<td><?php echo $row["filename"]; ?></td>
<td><?php echo date('Y-m-d',$row["add_time"]); ?></td>
<td><a href="{:url('fladmin/Goods/add')}?type_id=<?php echo $row["id"]; ?>">发布商品</a> | <a href="{:url('add')}?parent_id=<?php echo $row["id"]; ?>">增加子类</a> | <a href="{:url('edit')}?id=<?php echo $row["id"]; ?>">更改</a> | <a onclick="delconfirm('{:url('del')}?id=<?php echo $row["id"]; ?>')" href="javascript:;">删除</a></td>
</tr><?php }} ?>
</tbody></table></div><!-- 表格结束 --></form><!-- 表单结束 -->
{/block}